package ChrisC;

import org.uispec4j.Button;
import org.uispec4j.Table;
import org.uispec4j.UISpecTestCase;
import org.uispec4j.Window;


public class AuctionTest extends UISpecTestCase {
 	

public void testAuctions() {
  Table auctions = getMainWindow().getTable();
  assertTrue(auctions.contentEquals(new Object[][]{
    {"1", "Laptop","200"},
    {"2", "CellPhone","150"},
    {"3", "Usb Hub","15"}}));
 }


	
	public void testSimpleJoin() throws Exception {
		 Window window = getMainWindow();
		  Table table = window.getTable();
		  Button newJoinButton = window.getButton("Join");
		  
		  
		  newJoinButton.click();
		  assertTrue(table.contentEquals(new String[][]{
				    {"TestUser", "12345"}
		  }));
		
	}
	
	public void testBidAuction() throws Exception {
		Window window = getMainWindow();
		Button newBidButton = window.getButton("Bid");
	/*	WindowInterceptor orderPopup = WindowInterceptor.init(submit.
                triggerClick());
		orderPopup.process(new WindowHandler());
		*/
	}

}
